import pymysql
db = pymysql.connect(host='localhost',
                     port=3306,
                     user='root',
                     password='123456',
                     database='jingdong',
                     charset='utf8'
                     )
cur = db.cursor()
sql = "CREATE TABLE goods(id int unsigned primary key auto_increment not null,name varchar(150) not null,cate_name varchar(40) not null,brand_name varchar(50) not null,price decimal(10,3) not null default 1,is_saleoff bit not null default 0);"
cur.execute(sql)
db.commit()
cur.close()
db.close()
